package com.lggry.interface2;

public class Test {
    public static void main(String[] args) {
        //目标：理解java设计接口的好处、用处
        //接口弥补了类单继承的不足，可以让类拥有更多角色，类的功能更强大
        People people = new Student();
        Driver driver = new Student();
        BoyFriend boyFriend = new Student();

        //接口可以实现面向接口编程，更利于解耦
    }
}


interface Driver{}
interface BoyFriend{}

class People{}
class Student extends People implements Driver, BoyFriend{}